home *** CD-ROM | disk | FTP | other *** search
/ 8bitfiles.net/archives / archives.tar / archives / compuserve-file-archive / 08 System Utilities / WD1770.TXT < prev    next >
Text File  |  2019-04-13  |  5KB  |  136 lines

  1. **********************************
  2. * WD 1770 Floppy Disk Controller *
  3. **********************************
  4.  
  5. * automatic track seek with verify
  6. * soft-sector format compatibility
  7. * read or write with:
  8.                      single or multiple records
  9.                      automatic sector search
  10.                      entire track read or write
  11. * programmable:
  12.                 track to track stepping time
  13.                 head settling time
  14.                 head engage time
  15.                 three-phase or step-plus-direction motor control
  16.                 dma or program transfers
  17.  
  18.  
  19. Communicating with the 1770 is accomplished by accessing six registers.
  20.  
  21. Address bits          MODE
  22.    A1    A0    READ           WRITE
  23. ------------------------------------------
  24.    0     0     Status reg.    Command reg.
  25.    0     1     Track reg.     Track reg.
  26.    1     0     Sector reg.    Sector reg.
  27.    1     1     Data reg.      Data reg.
  28.  
  29. Where A0 and A1 are pins three and four, respectively.
  30. In the Commodore 1571 the WD1770 is located at addresses $2000 to $2003.
  31.  
  32. The command register recognizes eleven commands:
  33.  
  34.    Command   command word bits  7 6 5 4 3 2 1 0
  35.    -------                      ---------------
  36. 1.  Restore                     0 0 0 0 h v x y
  37. 2.  Seek                        0 0 0 1 h v x y
  38. 3.  Step                        0 0 1 u h v x y
  39. 4.  Step in                     0 1 0 u h v x y
  40. 5.  Step out                    0 1 1 u h v x y
  41. 6.  Read sector                 1 0 0 m h e 0 0
  42. 7.  Write sector                1 0 1 m h e p a
  43. 8.  Read address                1 1 0 0 h e 0 0
  44. 9.  Read track                  1 1 1 0 h e 0 0
  45. 10. Write track                 1 1 1 1 h e p 0
  46. 11. Force interrupt             1 1 0 1 i j k 1
  47.  
  48. with the special bits defined as follows:
  49.  
  50. h   -   0= motor on / 1= motor off
  51. v   -   0= verify track / 1= don't verify
  52. x/y -   Step rate
  53.                     1770                1771        1772
  54.             0 0      6ms (166steps/sec)  6ms        ?
  55.             0 1     12ms (88)            6ms        ?
  56.             1 0     20ms (50)            8ms        ?
  57.             1 1     30ms (33)           10ms        ?
  58.  
  59. u   -   0= don't / 1= do    set track reg to track in sector header
  60. m   -   0= read one sector / 1= read several
  61. a   -   0= set data mark for 'sector valid'
  62.         1= set data mark for 'sector erased'
  63. e   -   0= no head settling time
  64.         1= 30ms head settling time
  65. p   -   0= precompensation on / 1= precompensation off
  66. i   -
  67. j   -
  68. k   -   index hole interrupt enable
  69. l   -   immediate unconditional interrupt
  70.         command ends without interrupt if i-j = 0
  71.  
  72. STATUS REGISTER
  73.  
  74. Bit
  75. 0.  Busy flag            -   a command is being executed
  76. 1.  Data request/index   -   signals that data can read/write from DATA reg
  77. 2.  Lost data/track 00   -   for commands 1 - 5 indicates head on track one
  78.                              for others, indicates that data reg was lost
  79. 3.  CRC error            -   header or data block checksum incorrect
  80. 4.  Record not found     -   Specified track or sector was not found
  81. 5.  Spinup/record type   -   for commands 1 - 5 indicates six rotations
  82.                              for cmds 6 - 11   bit holds 'data mark'
  83. 6.  Write protect        -   When writing indicates that wrt prot is on
  84. 7.  Motor on             -   motor staus 0= off / 1= on
  85.  
  86.  
  87. WD1770 Pin Layout *
  88.  
  89. Pin  Name   Function
  90. ---  ----   --------
  91. 1    CS     Chip select (low)
  92. 2    R/W    0= write / 1= read    registers
  93. 3/4  A0/1   Register address lines   when cs=0
  94. 5-12 D0-7   Data bus
  95. 13   MR     Master reset low
  96. 14   GND    ground connection
  97. 15   Vcc    +5 Volts
  98. 16   STEP   Output for step pulses to the head motor
  99. 17   DIRC   Step direction
  100. 18   CLK    Input for 8Mhz clock
  101. 19   RD     Read data from disk (also contains clock)
  102. 20   MO     Motor on switch
  103. 21   WG     Write gate  =1 if disk is being written to
  104. 22   WD     Write data pulses (along with clock) to disk
  105. 23   TR00   Track 0 input 0= head on track 0 / 1= not on 0
  106. 24   IP     Index pulse
  107. 25   WPRT   Write protect  0= write prtoect / 1= not protect
  108. 26   DDEN   Double density  if =0 / 1= single density *
  109. 27   DRQ    Data request   1= data register is ready
  110. 28   INTRQ  Interrupt request    1= end command
  111.  
  112. * Note that in the Commodore 1571, pins 16,17,20,23,27, and 28 are unconnected
  113. * pin 26 is held low (double density)
  114.  
  115. * If you own a Commodore 1581 and find that it contains a WD1770 you should
  116. * see you Commodore authorized service center about replacing it with
  117. * a WD1772 - as far as I know, Commodore is still replacing them even out
  118. * of warranty as of April 1988
  119.  
  120.  
  121. *****************************************************************
  122. This information is the compilation of several sources, including
  123. direct experimentation, and is provided without any guarantees of
  124. accuracy or any assumption of liability on my part.         GTK
  125. *****************************************************************
  126.  
  127.  
  128. Commodore 1571 and 1581 are trademarks or registered trademarks of
  129. Commodore International Ltd.
  130.  
  131. WD1770, 1771, and 1772 are trademarks of Western Digital Corp.
  132.                                          3218 Redhill Avenue
  133.                                          Newport Beach, CA 92663
  134.                                          (714) 557-3550
  135.                                          TWX: (910) 595-1139
  136.